package com.fhz.shop.ui.cart.datasource;

import androidx.lifecycle.LiveData;

import com.fhz.shop.api.ServiceApi;
import com.fhz.shop.callback.ApiResponse;
import com.fhz.shop.entity.UserCart;

import java.util.List;

import javax.inject.Inject;

import retrofit2.http.Query;

/**
 * 时间:2023/8/30
 *
 * @author Mr.Feng
 * 简述: TODO
 */
public class CartRemoteDataSource {
    @Inject
    ServiceApi mServiceApi;
    @Inject
    public CartRemoteDataSource() {
    }


    public LiveData<ApiResponse<List<UserCart>>> getCartList(int userId){
        return mServiceApi.getCartList(userId);
    }

    public LiveData<ApiResponse<UserCart>> updateNum(int cartId ,int num){
        return mServiceApi.updateNum(cartId, num);
    }


}
